package com.pmcc.cj.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pmcc.core.entity.UUIDEntity;
import com.pmcc.utils.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 登录人的位置信息
 * Created by tomas on 2020/9/21.
 */
@Entity
@Table(name = "cj_position")
public class CjPosition extends UUIDEntity {
    @Column(name = "customer_id")
    private String customerId;//用户id
    @Column(name = "xx")
    private Double xx;//经度坐标
    @Column(name = "yy")
    private Double yy;//纬度坐标
    @Column(name = "position_height")
    private Double positionHeight;//精度（代表获取位置的精度，数值类型）
    @Column(name = "highness")
    private Double highness;//高度 （海拔高度，数值类型）
    @Column(name = "country")
    private String country;//国家
    @Column(name = "province")
    private String province;//省份
    @Column(name = "city")
    private String city;//城市
    @Column(name = "county")
    private String county;//区县
    @Column(name = "town")
    private String town;//乡村
    @Column(name = "street")
    private String street;//街道
    @Column(name = "position_desc")
    private String positionDesc;//位置描述  （地图会告诉你，在什么附近）
    @Column(name = "create_time")
    private Date createTime;//定位时间

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId;
    }

    public Double getXx() {
        return xx;
    }

    public void setXx(Double xx) {
        this.xx = xx;
    }

    public Double getYy() {
        return yy;
    }

    public void setYy(Double yy) {
        this.yy = yy;
    }

    public Double getPositionHeight() {
        return positionHeight;
    }

    public void setPositionHeight(Double positionHeight) {
        this.positionHeight = positionHeight;
    }

    public Double getHighness() {
        return highness;
    }

    public void setHighness(Double highness) {
        this.highness = highness;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        this.county = county;
    }

    public String getTown() {
        return town;
    }

    public void setTown(String town) {
        this.town = town;
    }

    public String getPositionDesc() {
        return positionDesc;
    }

    public void setPositionDesc(String positionDesc) {
        this.positionDesc = positionDesc;
    }
    @JsonSerialize(using = DateTimeFormat.class)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }
}
